﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Microsoft.WindowsMobile.PocketOutlook;

namespace eeenno.ReaderEngine.Adapters
{
    /// <summary>
    /// Enables Email/SMS sharing functionality
    /// </summary>
    public class MsgEngine
    {
        /// <summary>
        /// Creates an SMS message with the selected message
        /// </summary>
        /// <param name="message"></param>
        public void CreateSMS(string title, string message)
        {
            SmsMessage sms = new SmsMessage();
            sms.Body = title + " -> " + message;
            MessagingApplication.DisplayComposeForm(sms);
        }

        public void CreateEmail(string title, string message)
        {
            EmailMessage email = new EmailMessage();
            email.Subject = title;
            email.BodyText = title + " -> " + message;
            MessagingApplication.DisplayComposeForm(email);
        }

        public void CreateEmail2(string subject, string recipient)
        {
            EmailMessage email = new EmailMessage();
            email.Subject = subject;
            email.To.Add(new Recipient(recipient));
            MessagingApplication.DisplayComposeForm(email);
        }
    }
}
